import unittest
import ddt

from Base.BaseSetings import TestData_dir
from Base.PublicFunction import OpenBroswer
from Business.HumanMangement_Sun import WoniuBoss

@ddt.ddt()
class TestWoniuBoss(unittest.TestCase):

    def setUp(self) -> None:
       self.run = WoniuBoss()

    # def tearDown(self) -> None:
    #     self.run.closebrower()

    @ddt.file_data(TestData_dir+'human_mangement.yaml')
    def test_01(self,**kwargs):
        info = self.run.human_mangement_creatstaff(kwargs)
        self.assertEqual(info[0][0],kwargs.get('assert_name'),'添加成功')
        self.assertEqual(info[1][0],kwargs.get('assert_name'),'添加成功')

    def test_02(self):
        info = self.run.human_mangement_querystaff('全部','全部','全部','张莉')
        self.assertEqual(info[0][0],'张莉','查询成功')

if __name__ == '__main__':
    unittest.main()